package org.xzx.shop_api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.Data;
import org.springframework.stereotype.Component;

@Component
@Data
@TableName("shop_search_histories")
public class SearchHistory {
    @TableId(type = IdType.AUTO)
    private Long id;
    @Column(name = "word")
    private String word;
    @Column(name = "member_id")
    private int memberId;
    @Column(name = "created_time")
    private int createdTime;

    @Override
    public String toString() {
        return "SearchHistory{" +
                "id=" + id +
                ", word='" + word + '\'' +
                ", memberId=" + memberId +
                ", createdTime=" + createdTime +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    public int getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(int createdTime) {
        this.createdTime = createdTime;
    }
}

